package com.iddactylogram.server.transfer.handler;

import com.iddactylogram.common.enumerate.CmdEnums;
import com.iddactylogram.server.utils.IPUtils;

import java.nio.charset.StandardCharsets;

public class HeartHandler implements CmdHandler {
    @Override
    public byte[] handle(CmdEnums cmd, String message) {
        String result = String.format("心跳检测成功:%s,ip:%s", System.currentTimeMillis(), IPUtils.getIp());
        return result.getBytes(StandardCharsets.UTF_8);
    }
}
